package angryballsDecorateur.outilsVue;

import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;
import java.util.Observer;

import angryballsDecorateur.outilsVue.strategy.EventStrategy;

public class EcouteurBouton extends Observable implements ActionListener {

	private EventStrategy strategy;

	public EcouteurBouton(Observer observer, Button button,
			EventStrategy strategy) {
		button.addActionListener(this);
		addObserver(observer);
		this.strategy = strategy;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		setChanged();
		notifyObservers(strategy);
	}
}
